<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddSomeColumnsToMonitoringRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('monitoring_records', function (Blueprint $table) {
            $table->integer('http_code')->comment('状态码');
            $table->float('total_time')->comment('总共的时间');
            $table->float('namelookup_time')->comment('域名解析完毕的时间');
            $table->float('connect_time')->comment('连接完毕的时间');
            $table->float('pretransfer_time')->comment('文件刚刚开始传输的时间');
            $table->float('starttransfer_time')->comment('从最开始到第一个字节被curl收到的时间');
            $table->float('redirect_time')->comment('重定向步骤的时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
